from flask import Flask,request
from models import db, User


app = Flask(__name__)

db.init_app(app)



@app.route('/')
def index():
    return 'Hello World!'


@app.route('/users',methods=['GET','POST'])
def index():
    if request.method == 'GET':
        users  = User.query.all()
        return users